.class public Ldgb/d;
.super Ljava/lang/Object;
.source "SourceFile"


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/content/IntentFilter;

.field private c:Z

.field private d:Landroid/content/BroadcastReceiver;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "android.net.conn.CONNECTIVITY_CHANGE"

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Ldgb/d;->b:Landroid/content/IntentFilter;

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Ldgb/d;->c:Z

    .line 4
    new-instance v0, Ldgb/d$a;

    invoke-direct {v0, p0}, Ldgb/d$a;-><init>(Ldgb/d;)V

    iput-object v0, p0, Ldgb/d;->d:Landroid/content/BroadcastReceiver;

    .line 5
    iput-object p1, p0, Ldgb/d;->a:Landroid/content/Context;

    return-void
.end method

.method static synthetic a(Ldgb/d;)Landroid/content/Context;
    .locals 0

    .line 1
    iget-object p0, p0, Ldgb/d;->a:Landroid/content/Context;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 3

    .line 2
    iget-object v0, p0, Ldgb/d;->a:Landroid/content/Context;

    iget-object v1, p0, Ldgb/d;->d:Landroid/content/BroadcastReceiver;

    iget-object v2, p0, Ldgb/d;->b:Landroid/content/IntentFilter;

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    const/4 v0, 0x1

    .line 3
    iput-boolean v0, p0, Ldgb/d;->c:Z

    return-void
.end method

.method public b()V
    .locals 3

    .line 1
    iget-boolean v0, p0, Ldgb/d;->c:Z

    if-eqz v0, :cond_0

    .line 2
    :try_start_0
    iget-object v0, p0, Ldgb/d;->a:Landroid/content/Context;

    iget-object v1, p0, Ldgb/d;->d:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Ldgb/d;->c:Z
    :try_end_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 4
    sget-boolean v1, Ldgb/z;->c:Z

    if-eqz v1, :cond_0

    const-string v1, "stat.ConnectivityChangeListener"

    const-string v2, "unRegister error: "

    .line 5
    invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_0
    :goto_0
    return-void
.end method
